package demo1;

import java.util.Comparator;

public class NameComparator implements Comparator<Staff> {

    @Override
    public int compare(Staff o1, Staff o2) {
        return o1.name.compareTo(o2.name);
    }
}
